import net.optix.ip.model.ModelLocator;
import net.optix.ip.vo.UserVO;

[Bindable]
private var model:ModelLocator	=	ModelLocator.getInstance();
private var _user:UserVO;

[Bindable]
private var welcome:String;

public function set user(value:UserVO):void
{
	_user	=	value;
	switch(model.role)
	{
		case 0:
			welcome	=	"";
			break;
		case 1:
			welcome	=	model.client.business;
			break;
		case 2:
			welcome	=	"Hello , "+model.user.firstName+" "+model.user.lastName+" . you are in inventor screen !";
			break;
		case 3:
			welcome	=	model.firm.name;
			break;
		case 4:
			welcome	=	"Hello , "+model.user.firstName+" "+model.user.lastName+" . you are in practitioner screen !";
			break;
		case 5:
			welcome	=	"Hello , "+model.user.firstName+" "+model.user.lastName+" . you are in manager screen !";
			break;
	}
}

public function get user():UserVO
{
	return _user;
}
